import numpy as np
import os

a = np.array([[2,4,5,1,3],[5,1,7,6,8],[1,4,9,5,2],[5,2,3,6,4],[4,8,2,6,5]])
b = np.array([[2,7,6,4,1],[4,6,5,3,1],[4,8,2,1,5],[4,6,3,5,8],[7,4,6,8,5]])

#矩阵范数
#print("|a|F = ", np.linalg.norm(a))

a1 = np.array([[2,4,5,1,3],[5,1,7,6,8],[1,4,9,5,2],[5,2,3,6,4]])
#print(len(a1))
#print(len(a1[0]))
#print(a)

#秩
#print(np.linalg.matrix_rank(1))

FilePath = os.path.abspath('.') + "\data\\" #+ "\data.txt"
parents = os.listdir(FilePath)
for parent in parents:
    if parent != "data.txt":
        FilePath1 = FilePath + parent
        #print(FilePath1)

print(a)
print(np.argsort(a, axis=0))
print(np.mean(a,axis=0))


